<template>
  <div class="dashboard-content" style="position:absolute;width:100%;">
    <el-card shadow="none" :body-style="{padding: '0px', position:'absolute', height:'100%', width: '100%'}">
      <div class="card-box clearfix" style="height:100%;">
        <div slot="header" class="clearfix card-title">
          <span>{{content.name}}</span>
          <el-button class="btn-more" type="text">更多 <i class="el-icon-d-arrow-right"></i></el-button>
        </div>
        <template>
          <div class="tabs-content-box" style="width: 100%; height: 100%;">
            <!--<div id="chart" :style="{width: '100%', height: '100%'}" auto-resize></div>-->
            <v-chart :options="barOption" :style="{width: '100%', height: '100%'}" :autoresize="true"> </v-chart>
          </div>
        </template>
      </div>
    </el-card>
  </div>
</template>

<script>
//let echarts = require('echarts/lib/echarts');
import ECharts from '~/static/js/vue-echarts';
import { barChartAll } from './data/Content.js';
//import option from '/portal/data/ChartsData.json';
require('echarts/lib/chart/bar');
require('echarts/lib/chart/line');
require('echarts/lib/chart/pie');
require('echarts/lib/component/tooltip');
require('echarts/lib/component/title');
require('echarts/lib/component/legend');
export default {
    name: 'barChartAll',
    props: ['content'],
    data(){
        return {
            barOption: {}
        };
    },
    components: {
        'v-chart': ECharts
    },
    methods: {

    },
    mounted() {
        this.$axios.get(barChartAll.url)
            .then(res => {
                this.barOption = res.data;
            });
        //console.log(this.content);
    }
};
</script>

